<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.4.1.min.js" ></script>
<%@ page import="java.nio.charset.StandardCharsets" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String message = null;
String script =null;
if(session.getAttribute("error") != null)
{

switch(session.getAttribute("error").toString())
{
case "login": 
{
message="用户不存在或密码错误";
script="alert("+message+");";
break;
}
default : break;
}
}
%>
<!DOCTYPE html>
<html lang="en" >
  <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/style.css">
    <title>首页</title>
  </head>
  <body>
    <div class="mainbox">
      <div class="form">
        <form action="./signup" class="register-form" method="POST">
          <input class="text" type="text" name="username" placeholder="用户名" required="">
          <input class="text" type="text" name="name" placeholder="姓名" required="">
          <input class="text email" type="email" name="email" placeholder="邮箱" required="">
          <input class="text" type="password" name="passwd" placeholder="密码" required="">
          <input class="text w3lpass" type="password" name="confirmpasswd" placeholder="确认密码" required="">
          <input class="text w3lpass" type="text" name="invitationCode" placeholder="邀请码" >
          <button type="submit" value="Submit">确认</button>
          <p class="message">已经有账号了?<a href="#">现在登录</a></p>
        </form>
        <form action="./login" class="login-form" method="POST">
          <input class="username" type="text" name="username" placeholder="用户名"/>
	  <span class="status"></span>
          <input type="password" name="passwd" placeholder="密码"/>
          <!-- <label>
            <input id="rememberMe" type="checkbox" value="1" name="net_auto_login">
            <span> 记住我(7天)</span>
          </label> -->
          <button type="submit" value="Submit">登录</button>
          <div>
            <p> 第三方登录 </p>
            <a href="https://cas.dgut.edu.cn?appid=javaee">
              <img id="dguticon"src="src/dgut.png" alt="傻逼登录">
            </a>
          </div>
          <p class="message">还没注册?<a href="#">创建账号</a></p>
        </form>
      </div>
    </div>
    <!-- <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> --> 
    <script  src="js/index.js"></script>
    <script><%=script%></script>
  </body>
</html>
